import {postWithoutToken} from '../post'
import wechatApi from '../../config/api/wechatApi'
import {get} from '../get'

export function getWechatUser(appid,code) {
  const params = {
    appId: appid,
    code: code
  };
  const result = postWithoutToken(wechatApi.getUserByWechat, params);
  return result
}
export function getWechatConfig(appId,token) {
  const params={appId:appId};
    const result = get(wechatApi.getWechatConfig,params,token);
    return result
}

export function authUser(username,password) {
  const params={username:username,password:password};
    const result = postWithoutToken(wechatApi.authUser,params);
    return result
}
